package com.drawu.drawuspring.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.drawu.drawuspring.domain.DTO.*;
import com.drawu.drawuspring.domain.Result;
import com.drawu.drawuspring.domain.VO.PostVO;
import com.drawu.drawuspring.domain.po.Posts;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hui
 * @since 2024-10-10
 */
public interface IForumService extends IService<Posts> {


    /**
     * 用户点赞
     */
    Result like(LikesBehaviorDto dto);

    /*
     * 获取token
     */
    Object getToken();

    /*
     * 收藏
     */
    Result collect(CollectBehaviorDto dto);


     /*
     *创建帖子
      */
    Posts createPost(PostDTO dto) throws Exception;

    /**
     * 获取帖子详情
     */
    PostVO getPostDetail(Integer id);

    PageDTO<PostVO> getAllPosts(PostPageDto postPageDto);



    Result uploadImage(MultipartFile mpFile);

    PostDTO chat(PostDTO postDTO) throws Exception;

    List<PostVO> getAllCollect();

    Result deletePost(Integer id);

    Result editPost(PostDTO dto);

    Result deleteImage(DeleteImageDto deleteImageDto);
}
